From 3344a0c5cd793e2e9a3b0ccf9d2c0ea32829f377 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Sat, 24 Sep 2022 23:23:27 +0200
Subject: [PATCH 12/19] compiler-rt: HACK: force -fno-lto for builtins

---
 compiler-rt/lib/builtins/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 9b4c9bad7..d1aeb5392 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -668,7 +668,7 @@ if (APPLE)
   add_subdirectory(macho_embedded)
   darwin_add_builtin_libraries(${BUILTIN_SUPPORTED_OS})
 else ()
-  set(BUILTIN_CFLAGS "")
+  set(BUILTIN_CFLAGS "-fno-lto")
 
   if (COMPILER_RT_HAS_FCF_PROTECTION_FLAG)
     append_list_if(COMPILER_RT_ENABLE_CET -fcf-protection=full BUILTIN_CFLAGS)
-- 
2.37.3

